/**
 * Created by wangshuyi on 2017/8/3.
 */

'use strict';

const weChatUtil = require('./wechat');
weChatUtil.config.appid = 'wx82063177912dbb0b';
weChatUtil.config.secret = '7608377449d14b94a8d6ca404df5afb3';

let openid = 'omlKSwNA3SCtTpAxNOYyCAdclRiA';
let message = {
    touser: openid,//openid
    template_id: "0YiZVYOgnB-k3n23X2PMksDaCeDOlBHeb3PfyJWju3c",//
    url: "www.baidu.com",
    topcolor: "#FF0000"
};
message.data = {
    first: {value: "您好，将于2017年1月15日 13:23退房", color: "#173177"},
    keyword1: {value: "8308", color: "#173177"},
    keyword2: {value: "200元", color: "#173177"},
    keyword3: {value: "15元", color: "#173177"},
    keyword4: {value: "167元", color: "#173177"},
    keyword5: {value: "0元", color: "#173177"},
    remark: {value: "入住3天，消费矿泉水1瓶，王老吉1瓶。", color: "#173177"}
};
weChatUtil.templateMessage(message, () => {
    console.log('send complete');
});